package com.fsquare.shipping.service;

import java.util.List;

import javax.annotation.Resource;

import org.broadleafcommerce.core.order.domain.FulfillmentOption;
import org.broadleafcommerce.core.order.fulfillment.domain.BandedPriceFulfillmentOption;
import org.broadleafcommerce.core.order.fulfillment.domain.FulfillmentPriceBand;
import org.broadleafcommerce.core.order.service.FulfillmentOptionServiceImpl;

import com.fsquare.shipping.dao.ExtFulfillmentOptionDao;

public class ExtFulfillmentOptionServiceImpl extends FulfillmentOptionServiceImpl implements ExtFulfillmentOptionService{

	@Resource(name = "extFulfillmentOptionDao")
	protected ExtFulfillmentOptionDao fulfillmentOptionDao;
	
	@Override
	public FulfillmentPriceBand readFulfillmentOptionPricebandById(Long id) {
		FulfillmentPriceBand fulfillmentPriceBand = fulfillmentOptionDao.readFulfillmentPriceBandById(id);
		return fulfillmentPriceBand;
	}

	@Override
	public FulfillmentPriceBand saveFulfillmentPriceBand(FulfillmentPriceBand fulfillmentPriceBand) {
		fulfillmentPriceBand = fulfillmentOptionDao.save(fulfillmentPriceBand);
		return fulfillmentPriceBand;
	}

	@Override
	public void deleteFulfillmentPriceBand(Long id) {
		fulfillmentOptionDao.deleteFulfillmentPriceBand(id);
	}

	@Override
	public void deleteFulfillmentOption(Long id) {
		fulfillmentOptionDao.deleteFulfillmentOption(id);
	}

	@Override
	public List<FulfillmentPriceBand> readFulfillmentOptionPricebandsByFulfillmentOption(Long fulfillmentOptionId) {
		List<FulfillmentPriceBand> list = fulfillmentOptionDao.readFulfillmentOptionPricebandsByFulfillmentOption(fulfillmentOptionId);
		return list;
	}

	
	public ExtFulfillmentOptionDao getFulfillmentOptionDao() {
		return fulfillmentOptionDao;
	}

	public void setFulfillmentOptionDao(ExtFulfillmentOptionDao fulfillmentOptionDao) {
		this.fulfillmentOptionDao = fulfillmentOptionDao;
	}
	
	@Override
    public FulfillmentOption createFulfillmentOption() {
        return fulfillmentOptionDao.createFulfillmentOption();
    }
	
	@Override
    public BandedPriceFulfillmentOption createBandedPriceFulfillmentOption() {
        return fulfillmentOptionDao.createBandedPriceFulfillmentOption();
    }
	
	@Override
    public FulfillmentPriceBand createFulfillmentPriceBand() {
        return fulfillmentOptionDao.createFulfillmentPriceBand();
    }
	
	
}
